package cc.fine.svc.main.properties;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @AUTHOR: wyihe
 * @DATE: 2023/10/25
 */
@Component
    public class QiniuKodoProperties implements InitializingBean {


    @Value("${qiniu.kodo.bucket}")
    private String bucket;

    @Value("${qiniu.kodo.ak}")
    private String ak;

    @Value("${qiniu.kodo.sk}")
    private String sk;

    @Value("${qiniu.kodo.download-url}")
    private String downloadUrl;

    public static String BUCKET;

    public static String AK;

    public static String SK;

    public static String DOWNLOAD_URL;

    @Override
    public void afterPropertiesSet() {
        BUCKET = bucket;
        AK = ak;
        SK = sk;
        DOWNLOAD_URL = downloadUrl;
    }
}
